import Taro from "@tarojs/taro";

export default class EventUtils {
  static UserList = 'userList'

  static on(key, callback) {

    Taro.eventCenter.on(key, callback)
    return () => {
      Taro.eventCenter.off(key, callback)
    }
  }

  static trigger(key, data) {
    Taro.eventCenter.trigger(key, data)
  }

}
